ATSUCreateTextLayout

Creates an uninitialized text layout object.

OSStatus ATSUCreateTextLayout (ATSUTextLayout *oTextlLayout);
oTextLayout
A pointer to a reference of type ATSUTextLayout. On return, the newly-created text layout object.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUCreateTextLayout function creates an empty text layout object that contains default text layout attributes but no style runs, soft line breaks, or associated text. The default text layout attribute values are described in Table C-2. You can set non-default text layout attribute values by calling the function ATSUSetLayoutControls.

To create a text layout object that contains style runs, text, and soft line breaks, call the functions ATSUCreateTextLayoutWithTextHandle and ATSUCreateTextLayoutWithTextPtr.

Most functions that operate on text layout objects require that they have style runs, text, and soft line breaks. To assign style runs, text, and soft line breaks to an "empty" text layout object, call the functions ATSUSetRunStyle, ATSUSetTextPointerLocation or ATSUSetTextHandleLocation, and ATSUSetSoftLineBreak or ATSUBreakLine.

To create a copy of an existing text layout object, call the function ATSUCreateAndCopyTextLayout.

SPECIAL CONSIDERATIONS
ATSUCreateTextLayout allocates memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

VERSION NOTES
Available beginning with ATSUI 1.0.

© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)